# Use Python 3.11 slim image
FROM python:3.11-slim

# Set working directory
WORKDIR /app

# Install PDM
RUN pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple pdm

# Copy project files
COPY pyproject.toml pdm.lock README.md ./
COPY . .

# Install dependencies
RUN pdm install --production

# Expose port
EXPOSE 5000:5000

# Run the application
CMD ["pdm", "run", "start"] 